package club;

import java.util.ArrayList;
import java.util.List;

public class ClubManager {
    List<club> clubs;

    public ClubManager() {
        clubs = new ArrayList<>();
    }

    public void addClub(club club) {
        clubs.add(club);
    }

    public club findClub(String clubName) {
        for (club club : clubs) {
            if (club.getName().equals(clubName)) {
                return club;
            }
        }
        return null;
    }

    public void printAllClubs() {
        for (club club : clubs) {
            System.out.println("Club: " + club.getName());
            for (Department department : club.getDepartments()) {
                System.out.println("  Department: " + department.getName());
                for (Member member : department.getMembers()) {
                    System.out.println("    " + member);
                }
            }
        }
    }
}

